export default {
  /**
   * 备品附件管理涉及的接口-----------------------------------------------------------------------------
   *
   */

  /**
   * 02200001---备品附件列表
   * /device/deviceattachment/list
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  attaName              备品名称
   * @param  {string}  attaType              备品类型
   * @param  {string}  maintenanceId         维保单位
   *
   */
  "POST /device/deviceattachment/list": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data: {
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list: [
          {
            attaId:"1",
            attaCode: "001",
            attaName: "网络摄像头",
            modelNum: "H002",
            trademark: "海康威视",
            supplier: "海康威视",
          },
          {
            attaId:"2",
            attaCode: "002",
            attaName: "网络摄像头",
            modelNum: "H002",
            trademark: "海康威视",
            supplier: "海康威视",
          },
          {
            attaId:"3",
            attaCode: "002",
            attaName: "网络摄像头",
            modelNum: "H002",
            trademark: "海康威视",
            supplier: "海康威视",
          },
          {
            attaId:"4",
            attaCode: "001",
            attaName: "网络摄像头",
            modelNum: "H002",
            trademark: "海康威视",
            supplier: "海康威视",
          },
          {
            attaId:"5",
            attaCode: "002",
            attaName: "网络摄像头",
            modelNum: "H002",
            trademark: "海康威视",
            supplier: "海康威视",
          }
        ]
      }
    });
  },


  /**
   * 02200002---添加备件
   * /device/deviceattachment/save
   * @param  {string}  attaName             备件名称
   * @param  {string}  maintainPeriod       保养周期
   * @param  {string}  attaType             备件类型
   * @param  {string}  attaLife             备件寿命
   * @param  {string}  modelNum             备件型号
   * @param  {string}  attaCode             备件编号
   * @param  {string}  maintenanceId        维保单位
   * @param  {string}  attaParam            参数
   * @param  {string}  trademark            品牌
   * @param  {string}  supplier             供货商
   * @param  {string}  remarks              备注
   * @param  {string}  attaPhoto            设备图片
   * @param  {array}   attaDatum            设备资料（支持多个文件上传，存储为数组）
   *
   */
  "POST /device/deviceattachment/save": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02200003---修改备件
   * /device/deviceattachment/update
   *
   * @param  {string}  attaId               备件ID
   * @param  {string}  attaName             备件名称
   * @param  {string}  maintainPeriod       保养周期
   * @param  {string}  attaType             备件类型
   * @param  {string}  maintenanceId        维保单位
   * @param  {string}  attaLife             备件寿命
   * @param  {string}  modelNum             备件型号
   * @param  {string}  attaCode             备件编号
   * @param  {string}  attaParam            参数
   * @param  {string}  trademark            品牌
   * @param  {string}  supplier             供货商
   * @param  {string}  remarks              备注
   * @param  {string}  attaPhoto            备件图片
   * @param  {array}   attaDatum            备件资料（支持多个文件上传，存储为数组）
   */
  "POST /device/deviceattachment/update": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02200004---获取单个备件信息
   * /device/deviceattachment/info/{attaId}
   * @param  {string}  attaId            备件id
   *
   */
  "POST /device/deviceattachment/info": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        attaId:"1",
        attaName:"网络摄像头",
        attaType:"01",
        modelNum:"H001",
        attaParam:"16",
        maintenanceId:"1",
        trademark:"海康威视",
        supplier:"海康威视",
        maintainPeriod:"12个月",
        attaLife:"1",
        attaLifeName:"1年",
        attaCode:"1000",
        remarks:"XXXX",
      },
      attaPhoto:{
        uid: 'I100000000113',
        name: '211841154.jpg',
        url: 'http://www.qqzhi.com/uploadpic/2015-02-02/211841154.jpg',
      },
      attaDatum:[{
        uid: 'I100000000114',
        name: '2bb91d50f8b681a4e38370f2c94a2983.doc',
        url: 'http://dytdev.oss-cn-hangzhou.aliyuncs.com/upim-incubator/100000/project/10000000000014/20180409164543-2ab91d50f8b681a4e38370f2c94a2983.doc',
      },{
        uid: 'I100000000115',
        name: '2ab91d50f8b681a4e38370f2c94a2983.xls',
        url: 'http://dytdev.oss-cn-hangzhou.aliyuncs.com/upim-incubator/100000/project/10000000000014/20180409164543-2ab91d50f8b681a4e38370f2c94a2983.xls',
      }]
    });
  },


  /**
   * 02200005---设备（单个）批量操作 删除
   * /device/deviceattachment/delete
   * @param  {array}   attaIds              设备记录id，支持多个
   */
  "POST /device/deviceattachment/delete": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },



  /**
   * 02200007---设备（单个）批量导出
   * @param  {array}   attaIds        设备记录id
   */
  "POST /02200007": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02200008---备件（单个）批量导入
   * @param  {string}   file_url    上传到服务器的文件路径（上传接口统一调用公用的，得到token后回传）
   */
  "POST /02200008": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0"
    });
  },


  /**
   * 02200009---单个备件关联设备查询
   * /device/deviceattachment/attaDeviceList
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  attaId                备件id
   */
  "POST /device/deviceattachment/attaDeviceList": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          devId:"1",
          devCode:"1000",
          devName:"网络摄像头",
          devType:"01",
          devTypeName:"海康威视",
          devModel:"00132323"
        },{
          devId:"2",
          devCode:"1000",
          devName:"网络摄像头",
          devType:"02",
          devTypeName:"海康威视2",
          devModel:"00132323"
        }]
      }
    });
  },



  /**
   * 02200010---单个备件使用记录查询
   * /device/deviceattauserecord/list
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  attaId                备件id
   */
  "POST /device/deviceattauserecord/list": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          recordId:"1",
          useType:1,
          mainId:"1111",
          startTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头",
          maintenanceId: "1",
          maintenanceName:"杭州海康",
        },{
          recordId:"2",
          useType:2,
          mainId:"1111",
          startTime: 1515554892000,
          devCode:"1000",
          devName:"网络摄像头",
          maintenanceId: "2",
          maintenanceName:"杭州海康",
        }]
      }
    });
  },

  /**
   * 02200011---单个备件操作日志
   * /device/deviceattacholog/list
   * @param  {number}  currentPage           当前页
   * @param  {number}  pageSize              每页显示数量
   * @param  {string}  attaId                备件id
   */
  "POST /device/deviceattacholog/list": (req, res) => {
    res.send({
      trace_id: "15d9733dc1fe4072005ac112a01717a",
      request_id: "15d9733dc1fe4772002ac112a01715c",
      error_info: "执行成功",
      error_no: "0",
      data:{
        pagination: {
          current: 1,
          pageSize: 30,
          total: 40
        },
        list:[{
          logId:"1",
          createTime: 1515554892000,
          username:"操作员2",
          operateCon:"日志内容",
          // ip:"10.0.2.34",
        },{
          logId:"2",
          createTime: 1515554892000,
          username:"操作员1",
          operateCon:"日志内容",
          // ip:"10.0.2.34",
        }]
      }
    });
  },



};
